package com.syt.smn.cliert;

import io.swagger.annotations.ApiParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@FeignClient("service-zdlb")// 远程调用封装
public interface DictFeignClient {

    // 根据dictcode 和 value 查询
    @GetMapping("/syt/zdlb/dict/getName/{dictCode}/{value}")
    public String getName(
            @ApiParam(name = "parentDictCode", value = "上级编码", required = true)
            @PathVariable("dictCode") String dictCode,

            @ApiParam(name = "value", value = "值", required = true)
            @PathVariable("value") String value);

    // 根据 value 查询
    @GetMapping("/syt/zdlb/dict/getName/{value}")
    public String getName(
            @ApiParam(name = "value", value = "值", required = true)
            @PathVariable String value);


/*
    @GetMapping(value = "/syt/zdlb/dict/getName/{parentDictCode}/{value}")
    String getName(@PathVariable("parentDictCode") String parentDictCode, @PathVariable("value") String value);

    *//**
     * 获取数据字典名称
     * @param value
     * @return
     *//*
    @GetMapping(value = "/syt/zdlb/dict/getName/{value}")
    String getName(@PathVariable("value") String value);*/

}
